package ld.oauth.blog.mapper.article;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ld.oauth.blog.model.po.article.ArticleCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ld
 * @since 2022-09-24
 */
public interface ArticleCategoryMapper extends BaseMapper<ArticleCategory> {

    int insertList(@Param("list")List<ArticleCategory> list);

    /**
     * 根据文章id删除分类集合
     * @param articleId
     * @return
     */
    int removeCategoryIdsByArticleId(@Param("articleId")Integer articleId);

    /**
     * 根据文章id删除标签集合
     * @param articleId
     * @return
     */
    int removeLabelsIdsByArticleId(@Param("articleId")Integer articleId);


    List<ArticleCategory> getCArticleCategorytByCategoryIdList(@Param("categoryIdList")List<Integer> categoryIdList);

}
